# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月23日
"""
import numpy as np
from sklearn.cluster import KMeans

X = np.array([[1,10],[1,11],[1,12],[3,20],[3,23],[3,21],[3,25]])
kmodel = KMeans(n_clusters=2)
y_pred = kmodel.fit_predict(X)
print('预测类别:',y_pred)
print('聚类中以坐标值:\n',kmodel.cluster_centers_)
print('类别标记',kmodel.labels_)
